<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="js/vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- 插值表达式不能用作属性，值未解析 -->
    <a href="{{site.url}}">{{site.name}}</a>
    <a href="site.url">{{site.name}}</a>
    <!-- v-bind指令，把后面内容就不是普通字符串，而是vue变量 -->
    <a v-bind:href="site.url">{{site.name}}</a>
    <a :href="site.url">{{site.name}}</a>

    <!--
       v-text指令它纯文本输出 v-html翻译html标签
      div.innerText,div.innerHtml
    -->
    <p v-text="sysname"></p>
    <p v-html="sysname"></p>
  </div>

  <script>
    var vm = new Vue({
      el: '#app',
      data: {
        sysname: "<b>京淘</b>电商平台",
        site: {
          name: "java培优官网",
          url: "http://act.codeboy.com"
        }
      },
      methods: {}
    });
  </script>
</body>

</html>